{% set fsf_step = "build" %}
{% extends "first-snap/_layout_fsf.html" %}

{% block fsf_content %}
  <div class="row">
    <div class="col-8">
      <ol class="p-stepped-list has-margin">
        {% for step in steps %}
          {% if not step.warning %}
            <li class="p-stepped-list__item">
              <h4 class="p-stepped-list__title u-no-limit">
                {{ step.action }}
              </h4>
              {% if step.command %}
                <span class="p-stepped-list__content">
                  {% set snippet_value = step.command|replace("${name}", snap_name) %}
                  {% set snippet_id = loop.index %}
                  {% if snippet_value.count('\n') == 0 %}
                    {% include "/partials/_code-snippet.html" %}
                  {% else %}
                    {% include "/partials/_code-snippet-multi.html" %}
                  {% endif %}
                </span>
              {% endif %}
            </li>
          {% endif %}
        {% endfor %}
        {% for step in steps %}
          {% if loop.last and step.warning %}
            <div class="p-notification--caution">
              <p class="p-notification__response">
                {{ step.warning|replace("${name}", snap_name)|safe }}
              </p>
            </div>
          {% endif %}
        {% endfor %}
      </ol>
    </div>
  </div>
{% endblock %}

{% block fsf_pagination %}
  <a class="p-button--neutral" href="/first-snap/{{ language }}/{{ os }}/package">
    &lsaquo; Previous: Package snap
  </a>

  {% if os and os.startswith('macos') %}
    <a class="p-button--positive u-float-right" href="/first-snap/{{ language }}/{{ os }}/test">
      Next: Test snap &rsaquo;
    </a>
  {% else %}
    <a class="p-button--positive u-float-right" href="/first-snap/{{ language }}/{{ os }}/push">
      Next: Publish to store &rsaquo;
    </a>
  {% endif %}
{% endblock %}
